package com.wcl.demo.presenter;

import android.view.View;

import com.wcl.demo.model.ModelLogin;
import com.wcl.demo.model.modelinterface.ModelLoginInterface;
import com.wcl.demo.presenter.presenterinterface.PresenterLoginInterface;
import com.wcl.demo.ui.ViewInterface.ViewLoginInterface;

import java.util.Map;

/**
 * Created by dllo on 15/11/20.
 */
public class LoginPresenter extends BasePresenter<ViewLoginInterface> implements PresenterLoginInterface {
    private ViewLoginInterface viewLoginInterface;
    private ModelLoginInterface modelLoginInterface;

    public LoginPresenter(ViewLoginInterface viewLoginInterface) {
        this.viewLoginInterface = viewLoginInterface;
        modelLoginInterface = new ModelLogin();
    }

    public void startLogin(Map<String , String> map){
        modelLoginInterface.startLogin(map , this);
    }

    public void sendLoginResult(String str){
        viewLoginInterface.showLoginResult(str);
    }
}
